(defvar log4cpp_format "\\(\\[INFO\\|\\[DEBUG\\)-\\([0-9]*\\)-\\(.*?\\)-\\(.*\\)(\\([0-9]*\\))")
(defvar log4cpp_filename_loc  4)
(defvar log4cpp_linenum_loc 5)

(defun open-next-log-loc()
  "searches and opens code for next log line"
  (interactive "*")
  (search-forward-regexp log4cpp_format)
  (setq log4cpp_filename (match-string 4))
  (setq log4cpp_fileloc (match-string 5))
  (print log4cpp_fileloc)
  (find-file-other-window log4cpp_filename)
  (goto-line (string-to-number log4cpp_fileloc))
)

